Query
The Query function returns a bunch of records starting from a specific key value and considering some filtering criteria.
Request body
{
   "tableName"<file-name>,
   "key": {
      "name"<key-logical-name>
      },
   "keyCondition"<condition>,
   "limit"<limit>,
   "descending"<ascending-descending>,
   "lastEvaluatedKey"<key-value>
   }
}
Parameters in the request body
file-name
The name of the file as it was configured in the catalog.
The catalog name must be used as a as prefix, unless you’re working on the default catalog (e.g. "DEFAULT.INVOICES" and "INVOICES" are equivalent)
key-logical-name
The logical name of the key.
Refer to the output of DescribeTable to retrieve the correct names
condition
Condition that must be true to confirm the extraction of the record.
Refer to Condition syntaxes for the syntax you can use for this parameter.
 
This parameter is optional
limit
The maximum number of records to return.
 
Setting this parameter to 0, null or negative values, all records are returned.
 
This parameter is optional. By default, all records are returned
ascending-descending
This is a boolean value.
Set it to false to have records returned in ascending order.
Set it to true to have records returned in descending order.
 
This parameter is optional. By default, records are returned in asceding order
key-value
The hash value of they key from which to start reading records.
Set it to the hash returned in the response of the previous Query invocation to continue reading the next bunch of records.
This parameter is optional. Set it to null or omit it to start from the first record
Response
On success, the function returns the list of read records followed by an hash value (lastEvaluatedKey) that you can use in the next request to read the next bunch of records. On error, an exception is returned.
Status
The function can return one of the following HTTP statuses:
200
Operation successful
400
Operation failed. Refer to the response for details about the error that occurred
401
Not authenticated
403
Operation not permitted
405
The request was not sent using the POST method
500
Server error. Refer to the response for details about the error that occurred